<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<%
	String formUrl=request.getParameter("formUrl");
	if(StringUtils.isBlank(formUrl)){
		formUrl="newBusinessReq_saveOrCommitTask.action";
	}
	
	
	String reDoformUrl=request.getParameter("reDoformUrl");
	if(StringUtils.isBlank(reDoformUrl)){
		reDoformUrl="flowTaskCommon_commitRedoTask.action";
	}
 %>
<div style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px;margin-right: 20px">
<div style="float: left;width: 670px">
	<s:if test="#request.taskView.procTranRecord.state!='end'">
	<s:if test="#request.taskView.procTranRecord.taskType!='03'">
	<button onclick="commitNotValidForm('<%=formUrl %>',false);" style="margin-right: 6px">保存</button>
	<button id="commitTaskBt1" onclick="commitForm('<%=formUrl %>',true);" style="margin-right: 6px">提交</button>
	<button id="commitTaskBt2" type="button" onclick="rollBackForm('flowTaskCommon_toTaskRollBack.action')" style="margin-right: 6px">回退</button>
	<button id="commitTaskBt3" type="button" onclick="transferTaskForm('flowTaskCommon_toTaskTransferAssign.action?flowTaskId=${taskView.procTranRecord.id }');" style="margin-right: 6px">转派</button>
	<button id="commitTaskBt4" type="button" onclick="readToDoTaskForm('flowTaskCommon_toTaskReadingToDo.action?flowTaskId=${taskView.procTranRecord.id }');" style="margin-right: 6px">传阅</button>
	<s:if test="#request.taskView.procTranRecord.processStep.nodeType==0">
		<button id="commitEndProcessBtnId" type="button" onclick="commitEndProcessForm('flowTaskCommon_completeTaskAndProcessInst.action?flowTaskId=${taskView.procTranRecord.id }');" style="margin-right: 6px">结束工单</button>
	</s:if>	
	</s:if>
	<s:else>
	<button id="commitTaskBt6" type="button" onclick="commitReadToDoTaskForm('<%=reDoformUrl %>');" style="margin-right: 6px">阅毕</button>
	</s:else>
	
	</s:if>
	<s:else>
	<s:if test="#request.taskView.procTranRecord.taskType!='03'">
	<button id="commitTaskBt5" type="button" onclick="recyclingTaskForm('flowRecyclingTask.action')" style="margin-right: 6px">回收</button>
	</s:if>									
	</s:else>
	<s:if test="#request.showEndBtn=='true'&&#request.taskView.processStatus.end==null">
	<button id="showEndBtn" type="button" onclick="endProcessInst('${procinstId }')" style="margin-right: 6px">强制结束流程</button>
	</s:if>
	<button id="showGraphBtn" type="button" onclick="Echoice.popCenter('flowTaskCommon_printInstGraph.action?procinstId=${procinstId }',800,600)" style="margin-right: 6px">轨迹</button>
	<button id="backHistoryBtn" type="button" onclick="javascript:history.go(-1);" style="margin-right: 6px">返回</button>
</div>
</div>
